#ifndef __BINARY_TREE_H__
#define __BINARY_TREE_H__

#include <vector>
#include "global.h"

TNODE *createBinaryTree(const char *file, std::vector<TNODE *> &node_list);
TNODE *createBinarySearchTree(const char *file, std::vector<TNODE *> &node_list);

// Contains both nodes
int containNodes(TNODE *root, TNODE *p, TNODE *q);

// There is an assumption that p and q are nodes of 
// the binary tree.
TNODE *leastCommonAncestor(TNODE *root, TNODE *p, TNODE *q);
TNODE *LCABST(TNODE *root, TNODE *p, TNODE *q);

void destroyBinaryTree(TNODE *root);

void printBinaryTreeLevel(TNODE *root);

void InOrderTraversal(TNODE *root);

#endif

